<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <form action="demo.html" id="form" onsubmit="sub()">
        <input type="text" name="username"><label for="" id="lbltext"></label></p>
        <input type="text" name="email">
        <input type="submit" value="提交" onclick="sub()">

    </form>

    <script src="./js.js"></script>
</body>
</html>